package org.yzl.designPatterns.decorator.impl;

import org.yzl.designPatterns.decorator.IDecorator;

public class DecoratorImpl implements IDecorator {
    public SourceImpl sourceImpl;

    public DecoratorImpl(SourceImpl sourceImpl){
        super();
        this.sourceImpl = sourceImpl;
    }
    @Override
    public void mothod1() {
        System.out.println("before source ");
        sourceImpl.mothod1();
        System.out.println("after source");
    }
}
